<div
    bsModal
    #createOrEditModal="bs-modal"
    class="modal fade"
    tabindex="-1"
    role="dialog"
    aria-labelledby="createOrEditModal"
    aria-hidden="true"
    [config]="{ backdrop: 'static', keyboard: !saving }"
>
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <form
                *ngIf="active"
                #editForm="ngForm"
                novalidate
                (ngSubmit)="save()"
            >
                <div class="modal-header">
                    <h4 class="modal-title">
                        <span *ngIf="parkingEditDto.id"
                            >编辑车场: {{ parkingEditDto.parkingName }}</span
                        >
                        <span *ngIf="!parkingEditDto.id">新增车场</span>
                    </h4>
                    <button
                        type="button"
                        class="close"
                        (click)="close()"
                        [attr.aria-label]="l('Close')"
                        [disabled]="saving"
                    >
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">
                    <div class="col-md-12">
                        <div class="form-group">
                            <label for="materialName">车场编号</label>
                            <input
                                type="text"
                                name="parkingCode"
                                class="form-control"
                                [(ngModel)]="parkingEditDto.parkingCode"
                            />
                        </div>
                    </div>
                    <div class="col-md-12">
                        <div class="form-group">
                            <label for="materialName">车场名称</label>
                            <input
                                type="text"
                                name="parkingCode"
                                class="form-control"
                                [(ngModel)]="parkingEditDto.parkingName"
                            />
                        </div>
                    </div>

                    <div class="col-md-12">
                        <div class="form-group">
                            <label for="materialName">小区</label>
                            <select
                                #languageCombobox
                                name="languageName"
                                class="form-control"
                                [(ngModel)]="parkingEditDto.neighbourhood_Name"
                                [(ngModel)]="parkingEditDto.neighbourhood_id"
                                required
                            >
                                <option value="">{{ emptyText }}</option>
                                <option
                                    *ngFor="let item of comboboxItem"
                                    [value]="item.value"
                                >
                                    {{ item.displayText }}
                                </option>
                            </select>
                            <validation-messages
                                [formCtrl]="languageCombobox"
                            ></validation-messages>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button
                        [disabled]="saving"
                        type="button"
                        class="btn btn-default"
                        (click)="close()"
                    >
                        取消
                    </button>
                    <button
                        type="submit"
                        class="btn btn-primary"
                        [disabled]="!editForm.form.valid"
                        [buttonBusy]="saving"
                        [busyText]="l('SavingWithThreeDot')"
                    >
                        <i class="fa fa-save"></i>
                        <span>保存</span>
                    </button>
                </div>
            </form>
        </div>
    </div>
</div>
